import { http } from "@/utils/request";

export const update_user_info = (data:any)=> {
  return http('POST','/my/update_user_info',data) //修改个人信息
};

export const update_account = (data:any)=> {
  return http('POST','/my/update_account',data) //修改账号
};

export const get_province_city_list = (data:any)=> {
  return http('GET','/region/get_province_city_list',data) //获取省份城市列表
};

export const region_regeo_from_ip = (data:any)=> {
  return http('GET','/region/regeo_from_ip',data) //根据IP获取定位
};

export const phone_code_with_no_catpcha = (data:any)=> {
  return http('POST','/account/phone/phone_code_with_no_catpcha',data) //不同图形验证码获取手机号验证码
};

export const my_update_phone = (data:any)=> {
  return http('POST','/my/update_phone',data) //修改手机号
};

export const get_about_us = (data:any)=> {
  return http('GET','/about_us/get_about_us',data) //关于我们
};

export const my_create_note = (data:any)=> {
  return http('POST','/my/create_note',data) //创建笔记
};

export const user_favourite_query = (data:any)=> {
  console.log(data);
  return http('POST','/user_favourite/query',data) //收藏列表
};

export const user_favourite = (data:any)=> {
  return http('GET','/user_favourite/'+data.item_id) //笔记回显
};

export const user_favourite_edit = (data:any)=> {
  return http('POST','/user_favourite/edit/'+data.item_id,data) //笔记编辑
};

export const user_favourite_delete = (data:any)=> {
  return http('DELETE','/user_favourite/'+data.item_id) //笔记删除
};